package com.ruoyi.monitoring.service.impl;

import com.ruoyi.monitoring.domain.HealthMonitoring;
import com.ruoyi.monitoring.mapper.HealthMonitoringMapper;
import com.ruoyi.monitoring.service.IHealthMonitoringService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 健康监测Service业务层处理
 *
 * @author ruoyi
 * @date 2025-01-06
 */
@Service
public class HealthMonitoringServiceImpl implements IHealthMonitoringService
{
    @Autowired
    private HealthMonitoringMapper healthMonitoringMapper;

    /**
     * 查询健康监测
     *
     * @param monitoringId 健康监测主键
     * @return 健康监测
     */
    @Override
    public HealthMonitoring selectHealthMonitoringByMonitoringId(Long monitoringId)
    {
        return healthMonitoringMapper.selectHealthMonitoringByMonitoringId(monitoringId);
    }

    /**
     * 查询健康监测列表
     *
     * @param healthMonitoring 健康监测
     * @return 健康监测
     */
    @Override
    public List<HealthMonitoring> selectHealthMonitoringList(HealthMonitoring healthMonitoring)
    {
        return healthMonitoringMapper.selectHealthMonitoringList(healthMonitoring);
    }

    /**
     * 新增健康监测
     *
     * @param healthMonitoring 健康监测
     * @return 结果
     */
    @Override
    public int insertHealthMonitoring(HealthMonitoring healthMonitoring)
    {
        return healthMonitoringMapper.insertHealthMonitoring(healthMonitoring);
    }

    /**
     * 修改健康监测
     *
     * @param healthMonitoring 健康监测
     * @return 结果
     */
    @Override
    public int updateHealthMonitoring(HealthMonitoring healthMonitoring)
    {
        return healthMonitoringMapper.updateHealthMonitoring(healthMonitoring);
    }

    /**
     * 批量删除健康监测
     *
     * @param monitoringIds 需要删除的健康监测主键
     * @return 结果
     */
    @Override
    public int deleteHealthMonitoringByMonitoringIds(Long[] monitoringIds)
    {
        return healthMonitoringMapper.deleteHealthMonitoringByMonitoringIds(monitoringIds);
    }

    /**
     * 删除健康监测信息
     *
     * @param monitoringId 健康监测主键
     * @return 结果
     */
    @Override
    public int deleteHealthMonitoringByMonitoringId(Long monitoringId)
    {
        return healthMonitoringMapper.deleteHealthMonitoringByMonitoringId(monitoringId);
    }
}

//package com.ruoyi.monitoring.service.impl;
//
//import com.ruoyi.monitoring.domain.HealthMonitoring;
//import com.ruoyi.monitoring.mapper.HealthMonitoringMapper;
//import com.ruoyi.monitoring.service.IHealthMonitoringService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//
//import java.util.List;
//
///**
// * 健康监测Service业务层处理
// *
// * @author ruoyi
// * @date 2025-01-06
// */
//@Service
//public class HealthMonitoringServiceImpl implements IHealthMonitoringService
//{
//    @Autowired
//    private HealthMonitoringMapper healthMonitoringMapper;
//
//    /**
//     * 查询健康监测
//     *
//     * @param monitoringId 健康监测主键
//     * @return 健康监测
//     */
//    @Override
//    public HealthMonitoring selectHealthMonitoringByMonitoringId(Long monitoringId)
//    {
//        return healthMonitoringMapper.selectHealthMonitoringByMonitoringId(monitoringId);
//    }
//
//    /**
//     * 查询健康监测列表
//     *
//     * @param healthMonitoring 健康监测
//     * @return 健康监测
//     */
//    @Override
//    public List<HealthMonitoring> selectHealthMonitoringList(HealthMonitoring healthMonitoring)
//    {
//        return healthMonitoringMapper.selectHealthMonitoringList(healthMonitoring);
//    }
//
//    /**
//     * 新增健康监测
//     *
//     * @param healthMonitoring 健康监测
//     * @return 结果
//     */
//    @Override
//    public int insertHealthMonitoring(HealthMonitoring healthMonitoring)
//    {
//        return healthMonitoringMapper.insertHealthMonitoring(healthMonitoring);
//    }
//
//    /**
//     * 修改健康监测
//     *
//     * @param healthMonitoring 健康监测
//     * @return 结果
//     */
//    @Override
//    public int updateHealthMonitoring(HealthMonitoring healthMonitoring)
//    {
//        return healthMonitoringMapper.updateHealthMonitoring(healthMonitoring);
//    }
//
//    /**
//     * 批量删除健康监测
//     *
//     * @param monitoringIds 需要删除的健康监测主键
//     * @return 结果
//     */
//    @Override
//    public int deleteHealthMonitoringByMonitoringIds(Long[] monitoringIds)
//    {
//        return healthMonitoringMapper.deleteHealthMonitoringByMonitoringIds(monitoringIds);
//    }
//
//    /**
//     * 删除健康监测信息
//     *
//     * @param monitoringId 健康监测主键
//     * @return 结果
//     */
//    @Override
//    public int deleteHealthMonitoringByMonitoringId(Long monitoringId)
//    {
//        return healthMonitoringMapper.deleteHealthMonitoringByMonitoringId(monitoringId);
//    }
//}
